﻿Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data
Public Class cMotorBD
    Public Shared Function EjecutarConsulta(ByVal cmd As SqlCommand, ByRef dtbDatos As DataTable) As Boolean
        Dim bolResultado As Boolean = True
        Try
            Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("cnxBD").ConnectionString)
                cmd.Connection = con
                Using da As New SqlDataAdapter(cmd)
                    da.Fill(dtbDatos)
                End Using
            End Using
        Catch ex As Exception
            bolResultado = False
        End Try
        Return bolResultado
    End Function
End Class
